package com.zhiyou100.pojo;

import java.io.Serializable;
import java.util.Set;

public class Role implements Serializable {
    private static final long serialVersionUID = 1L;
    private Integer r_id;
    private String r_name;
    private String r_num;
    private String r_desc;

    //权限
    private Set<Privilege>  ps;
    private Set<User> users;

    public Role(Integer r_id, String r_name, String r_num, String r_desc, Set<Privilege> ps, Set<User> users) {
        this.r_id = r_id;
        this.r_name = r_name;
        this.r_num = r_num;
        this.r_desc = r_desc;
        this.ps = ps;
        this.users = users;
    }

    public Role() {

    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getR_id() {
        return r_id;
    }

    public void setR_id(Integer r_id) {
        this.r_id = r_id;
    }

    public String getR_name() {
        return r_name;
    }

    public void setR_name(String r_name) {
        this.r_name = r_name;
    }

    public String getR_num() {
        return r_num;
    }

    public void setR_num(String r_num) {
        this.r_num = r_num;
    }

    public String getR_desc() {
        return r_desc;
    }

    public void setR_desc(String r_desc) {
        this.r_desc = r_desc;
    }

    public Set<Privilege> getPs() {
        return ps;
    }

    public void setPs(Set<Privilege> ps) {
        this.ps = ps;
    }

    public Set<User> getUsers() {
        return users;
    }

    public void setUsers(Set<User> users) {
        this.users = users;
    }

    @Override
    public String toString() {
        return "Role{" +
                "r_id=" + r_id +
                ", r_name='" + r_name + '\'' +
                ", r_num='" + r_num + '\'' +
                ", r_desc='" + r_desc + '\'' +
                ", ps=" + ps +
                ", users=" + users +
                '}';
    }
}
